package com.icss.id.controller;

import com.icss.id.pojo.User;
import com.icss.id.service.Impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
@Controller
@Component
public class UserController {
    @Autowired
    private UserServiceImpl userService;


    @RequestMapping("showUser")
    public String showUserList(ModelMap mp){

        List<User> userDescUn = userService.findUserDescUn();

        mp.addAttribute("userList",userDescUn);

        return "userList";
    }

}
